<template>
  <AppTaps v-if="showTaps" />
  <el-main class="!h-[calc(100vh-var(--sidebar-height)-var(--footer-height))] !p-1">
    <router-view v-slot="{ Component, route }">
      <transition enter-active-class="animate__animated animate__fadeIn" mode="out-in" appear>
        <keep-alive :include="keepAliveName">
          <component :is="Component" :key="route.path" />
        </keep-alive>
      </transition>
    </router-view>
  </el-main>
  <el-footer class="!h-[var(--footer-height)] !p-0" v-if="settingStore.footer">
    <AppFooter />
  </el-footer>
</template>

<script setup lang="ts" name="AppView">
import { useTagsViewStore, useSettingStore } from '@/stores'
const settingStore = useSettingStore()
const { showTaps } = storeToRefs(settingStore)
const keepAliveName = computed(() => useTagsViewStore().cachedViews)
</script>
<style lang="scss"></style>
